/**
 * Created by yinhui on 2022/5/9.
 */
import ipConfig from '../../../api/config/ipConfig'

/**
  * 获取字典列表
  * @param data
  * @returns {*}
 */
export const queryIpConfig = ({commit, state, rootState, dispatch}, data) => {
  return ipConfig.queryIpConfig(data)
    .then(response => {
      if (response.success) {
        return response
      }
    })
    .catch((err) => {
      console.error(err)
    })
}

/**
  * 更改限制
  * @param data
  * @returns {*}
 */
export const updateImLimitLevel = ({commit, state, rootState, dispatch}, data) => {
  return ipConfig.updateImLimitLevel(data)
    .then(response => {
      if (response.success) {
        return response
      }
    })
    .catch((err) => {
      console.error(err)
    })
}
